package routes

import (
	"github.com/labstack/echo/v4"
	"rabbit_love/src/service/client/views/data_views"
)

func DataApi(g *echo.Group) {
	// 挂载纪念日接口
	MarkApi(
		g.Group("/mark"))
	// 挂载日常接口
	DailyApi(
		g.Group("/daily"))
}

/*
MarkApi 纪念日相关接口
*/
func MarkApi(g *echo.Group) {
	g.GET("/get", data_views.GetMarkListApi).Name = "纪念日数据"
	g.POST("/upd", data_views.UpdMarkListApi).Name = "修改纪念日数据"
	g.POST("/del", data_views.DelMarkListApi).Name = "删除纪念日数据"
	g.POST("/add", data_views.AddMarkListApi).Name = "添加纪念日数据"
}

/*
DailyApi 日常相关接口
*/
func DailyApi(g *echo.Group) {
	g.GET("/get", data_views.GetDataListApi).Name = "日常数据"
	g.POST("/upd", data_views.UpdDataListApi).Name = "修改日常数据"
	g.POST("/add", data_views.AddDataListApi).Name = "添加日常数据"
}
